//
//  UILabel+Extension.swift
//  WeiBo
//
//  Created by 韩俊 on 15/12/11.
//  Copyright © 2015年 HanJun. All rights reserved.
//

import UIKit

extension UILabel {
    
    
    convenience init(textColor:UIColor,fontSize:CGFloat, maxWidth:CGFloat = 0){
        
        self.init()
        
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(fontSize)
        
        if maxWidth > 0 {
            
            numberOfLines = 0
            
            preferredMaxLayoutWidth = maxWidth
        }
    }
}
